/**
 * Created by Administrator on 2017/1/3.
 */

(function(window, document) {
    rootSize();
    function rootSize() {
        var screenWidth = document.documentElement.clientWidth || window.innerWidth;
        //        console.log(screenWidth);
        var rootSize = screenWidth > 644 ? 70 :
            screenWidth < 400 ? 400 / 920 * 100 : screenWidth / 920 * 100;
        document.documentElement.style.fontSize = rootSize + 'px';
    }
    //        window.addEventListener('DOMContentLoaded',rootSize);
    window.onload = function() {
        rootSize();
    };
    window.onresize = function() {
        rootSize();
    }
})(window, document)
